﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Core.Modal;
using Core.Helper;
using System.Data;

namespace Core.Core
{
    public class PDTUtil
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="project_id"></param>
        /// <param name="doc_id"></param>
        /// <param name="tag_id"></param>
        public static void Add(int project_id, int doc_id, int tag_id) {
            DbHelper.ExecuteNonQuery($"insert into PDTrelation(project_id, doc_id, tag_id) values('{project_id}','{doc_id}','{tag_id}')");
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="project_id"></param>
        /// <param name="tag_id"></param>
        public static void Delete(int project_id, int tag_id) {
            DbHelper.ExecuteNonQuery($"delete from PDTrelation where project_id='{project_id}' and tag_id='{tag_id}'");
        }
    }
}
